#实体刻度技能，持续+1
# scoreboard players add @e[type=!player] skCDKe 1
#【掉落物瞬间捡起】
execute as @e[type=minecraft:item] at @s if entity @a[distance=0..1.5] run data merge entity @s {PickupDelay:0}
execute as @e[type=minecraft:item] at @s unless entity @a[distance=0..1.5] run kill @s
execute as @a[scores={SystemItem=1..,SystemOutItem=0}] run tellraw @s [{"text":"                                          \n","color":"gold","bold":true,"italic":false,"underlined":false,"strikethrough":true,"obfuscated":false},{"text":"  请 勿 丢 弃 您 的 物 品","color":"red","bold":true,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}]
execute as @a[scores={SystemItem=1..,SystemOutItem=0}] run scoreboard players set @s SystemOutItem 10
scoreboard players reset @a[scores={SystemItem=1..}] SystemItem

#【登场坐标】
execute at @e[type=minecraft:armor_stand,tag=AirBorneSign,scores={skCDEntity=..4}] run particle minecraft:cloud ~ ~ ~ 2.5 1 2.5 0.01 30 force
kill @e[type=minecraft:armor_stand,tag=AirBorneSign,scores={skCDEntity=4..}]
#【登场空降】登场玩家效果：持续给予AirBorning玩家缓降
effect give @a[tag=AirBorning] slow_falling 1 0 false
execute as @a[tag=AirBorning] at @s run particle minecraft:cloud ~ ~2 ~ 0.2 0.2 0.2 0.1 1 force
execute as @a[tag=AirBorning] at @s run particle minecraft:crit ~ ~1.5 ~ 0.2 0.2 0.2 0.1 1 force
execute as @a[tag=AirBorning] at @s unless block ~ ~-2 ~ #minecraft:air run tag @s remove AirBorning
#【登场空降】按住Shift快速降落
execute as @a[tag=AirBorning,scores={SystemSneak=1..}] at @s run tp @s ~ ~-0.3 ~ 
scoreboard players set @a[scores={SystemSneak=1..}] SystemSneak 0


#【闲置战斗匹配】周围30格范围内没有存活玩家10秒后自动随机匹配其他战斗中的玩家
execute unless score AlivePlayer System matches 0..1 as @a[tag=Alive] at @s if entity @a[tag=Alive,distance=0.1..30] run scoreboard players set @s SystemNotAround 10
#【闲置战斗匹配】当剩余0秒之后随机自动匹配正在战斗中的玩家，并重置计时
execute unless score AlivePlayer System matches 0..1 as @a[tag=Alive,scores={SystemNotAround=..0}] at @s at @a[tag=Alive,distance=0.1..] run spreadplayers ~ ~ 4 10 false @s
execute unless score AlivePlayer System matches 0..1 as @a[tag=Alive,scores={SystemNotAround=..0}] run scoreboard players set @s SystemNotAround 10

# at @a[tag=Alive,distance=0.1..] run spreadplayers ~ ~ 4 10 false @s


#【燃烧时间】
execute as @a at @s store result score @s FireTime run data get entity @s Fire

#【战斗状态】
scoreboard players set @a[scores={skShangHaiState=1..}] skZhanDouState 5
scoreboard players set @a[scores={skShangHaiState=1..}] skShangHaiState 0
scoreboard players set @a[scores={skShouShangState=1..}] skZhanDouState 5
scoreboard players set @a[scores={skShouShangState=1..}] skShouShangState 0

#【实体刻度计分板】所有实体持续+1
scoreboard players add @e[type=!player] skTimeKe 1

#【箭射出后不可被捡起】【落地3s消失】
execute as @e[type=#arrows] run data merge entity @s {pickup:0}
execute as @e[type=#arrows,nbt={inGround:1b}] run scoreboard players add @s skCDEntity 3
kill @e[type=#arrows,scores={skCDEntity=180..}] 
#【清空10秒以上的火球】
kill @e[type=fireball,scores={skCDEntity=10..}]
#处理所有史莱姆
execute as @e[type=slime,scores={skTimeKe=5..}] at @s run tp @s ~ -65 ~
kill @e[type=slime,scores={skTimeKe=5..}]

#【清除300s以上的非玩家实体】
# kill @e[type=!player,type=!boat,tag=!System,tag=!kongtou,tag=!ying,tag=!Center,scores={skCDEntity=60..}]
# kill @e[type=chest_minecart,tag=kongtou,scores={skCDEntity=180..}]
